package com.gopay.common.cps.manager.gsrt.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.gopay.common.cps.dao.gsrt.GsrtFailureBidsMasterDao;
import com.gopay.common.cps.manager.gsrt.GsrtFailureBidsMasterQueryManager;
import com.gopay.common.domain.gsrt.GsrtFailureBidsMaster;

@Repository("gsrtFailureBidsMasterQueryManager")
public class GsrtFailureBidsMasterQueryManagerImpl implements GsrtFailureBidsMasterQueryManager {

	@Resource(name = "gsrtFailureBidsMasterDao")
	private GsrtFailureBidsMasterDao gsrtFailureBidsMasterDao;
	@Override
	public List<GsrtFailureBidsMaster> getByGopayId(String gopayOrderId) {
		String hql=" from GsrtFailureBidsMaster where gopayOrderId=:gopayOrderId ";
		Map<String, Object> param = new HashMap<String, Object>();
		param.put("gopayOrderId", gopayOrderId);
		List<GsrtFailureBidsMaster> list=gsrtFailureBidsMasterDao.findByHql(hql, param);
		return list;
	}
	@Override
	public List<GsrtFailureBidsMaster> getByMerIdOrderId(String merId, String orderId) {
		// TODO Auto-generated method stub
		return gsrtFailureBidsMasterDao.getByMerIdOrderId(merId, orderId);
	}
	@Override
	public List<GsrtFailureBidsMaster> getByMerIdBidNo(String merId, String bidNo) {
		String hql = "from GsrtFailureBidsMaster where  merCustId=:merId and bidNo=:bidNo";
		Map<String, Object> param = new HashMap<String, Object>();
		param.put("merId", merId);
		param.put("bidNo", bidNo);
		List<GsrtFailureBidsMaster> list = gsrtFailureBidsMasterDao.findByHql(hql, param);
		return list;
	}

	
}
